package com.dao.impl;

import com.dao.OrderItemDao;
import com.pojo.OrderItem;

/**
 * @Author hjb
 * @Date 13/6/2021 上午 3:37
 * @Version 1.0
 * @Contact 1754729389@qq.com
 */
public class OrderItemDaoImpl extends BaseDao implements OrderItemDao {
    @Override
    public int saveOrderItem(OrderItem orderItem) {

        String sql = "INSERT INTO orderItems(`name`,price,order_id)\n" +
                "VALUES(?,?,?)";
        return update(sql,orderItem.getName(),orderItem.getPrice(),orderItem.getOrderId());
    }
}
